package hoowin.app.wsnd.dao.springImp;

import hoowin.app.wsnd.dao.IWsndUserDao;
import hoowin.app.wsnd.model.WsndUser;
import hoowin.basic.util.Trans;

import org.springframework.jdbc.core.support.JdbcDaoSupport;

public class WsndUserDao extends JdbcDaoSupport implements IWsndUserDao {

	@Override
	public boolean addWsndUser(WsndUser wsndUser) {
		String sql = "insert into apps_wsnd_users (user_id, nationality, birthday) values (?, ?, ?)";
		if(super.getJdbcTemplate().update(sql, wsndUser.getId(), wsndUser.getNationality(), Trans.simpledateToString(wsndUser.getBirthday()))>0)return true;
		return false;
	}

}
